<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ page import="entity.Product"%>
<html>
<head>
<script type="text/javascript">
	function modoru() {
		history.back();
	}
</script>
<title>メイン画面3</title>
<style type="text/css">
body {
	background-color: #8FBC8F;
}

.center {
	text-align: center;
}

h1 {
	margin-top: 60px;
	width: 30%;
	background-color: #00BFFF;
}

.mytable1 {
	border-collapse: collapse;
}

.mytable1 th {
	font-weight: bold;
	background-color: #cccccc;
}

.mytable1 th,.mytable1 td {
	width: 110px;
	height: 35px;
	border: 1px solid black;
}

.mytable2 {
	border-collapse: collapse;
}

.mytable2 th {
	font-weight: bold;
	background-color: #cccccc;
}

.mytable2 th,.mytable2 td {
	width: 110px;
	height: 35px;
	border: 1px solid black;
}
</style>
</head>
<body>
	<div class="center">
		<h1>商品管理システム(仮)</h1>
	</div>
	<br> 詳細 <br> <br> <center>
				<form action="/abc/main3" method="post">
					<table class="mytable1">
						<tr>
							<th>商品ID</th>
							<th>商品名称</th>
							<th>大分類</th>
							<th>中分類</th>
							<th>小分類</th>
						</tr>
						<%
 	List<Product> products = (ArrayList)request.getAttribute("products");
 	for (Product product : products) {
 %>
						<tr bgcolor="#FFFFFF">
							<td><input type="text" name="productId"
								value="<%=product.getProductId()%>" /></td>
							<td><input type="text" name="productName"
								value="<%=product.getProductName()%>" /></td>
							<td><input type="text" name="productKbnA"
								value="<%=product.getProductKbnA()%>" /></td>
							<td><input type="text" name="productKbnB"
								value="<%=product.getProductKbnB()%>" /></td>
							<td><input type="text" name="productKbnC"
								value="<%=product.getProductKbnC()%>" /></td>
						</tr>
						<% } %>
					</table>
					<br> <br>
							<table class="mytable2">
								<tr>
									<th>仕入値</th>
									<th>販売価格</th>
									<th>発売社</th>
									<th>仕入先</th>
									<th>その他</th>
								</tr>
								<%
 	for (Product product : products) {
 %>
								<tr bgcolor="#FFFFFF">
									<td><input type="text" name="costPrice"
										value="<%=product.getCostPrice()%>" /></td>
									<td><input type="text" name="sellingPrice"
										value="<%=product.getSellingPrice()%>" /></td>
									<td><input type="text" name="maker"
										value="<%=product.getMaker()%>" /></td>
									<td><input type="text" name="supplier"
										value="<%=product.getSupplier()%>" /></td>
									<td><input type="text" name="dummy1"
										value="<%=product.getDummy1()%>" /></td>
								</tr>
								<% } %>
							</table> <br><br><br> <input type="submit" name="kousin"
										value="更新"> <input type="button" value="戻る"
											onclick="modoru()">
				</form>
				</center>
</body>
</html>